<h1>Images for
  <% if @item.class.to_s == 'Edition' %>
    <%= link_to @item, release_edition_path(@item.release, @item) %>
  <% else %>
    <%= link_to @item, @item %>
  <% end %>
</h1>

<% if @images.empty? %>
  There are no images for this <%=h @item.class.to_s %>
<% end %>

<% @images.each do |image| %>

  <div class="image-window">
    <%= link_to image_tag(image.image.url(:default)), image.image.url %><br />
    Type: <%=h image.image_type %><br />
    Description: <%=h image.description %><br />
    <% if permitted_to? :new, :delete_requests %>
      <%= link_to 'Delete Image?', 
                  new_delete_request_path(:editable_id => image.id,
                                          :editable_type => 'Image') %>
    <% end %>
  </div>

<% end %>
